﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using OpenAPI.Model.API;
using OpenAPI.IDAL.API;

namespace OpenAPI.DALFactory.API
{
    public class DataAccess
    {

        private static readonly string path = "API.";

        private DataAccess() { }

        /// <summary>
        /// 创建IMethod对象实例
        /// </summary>
        /// <returns></returns>
        public static IMethod CreateMethod()
        {
            return (IMethod)Utility.ReflectServiceLocator.LocateObject("OpenAPI_DAL", path + "MethodDAL");
        }

        /// <summary>
        /// 创建IDocument对象实例
        /// </summary>
        /// <returns></returns>
        public static IDocument CreateDocument()
        {
            return (IDocument)Utility.ReflectServiceLocator.LocateObject("OpenAPI_DAL", path + "DocumentDAL");
        }
    }
}
